{% extends "activity/content-layout.html.twig" %}


{% block body %}
  {% if not error is empty %}
    <div class="iframe-parent-content pv20 ph20">
      <div class="alert alert-danger"><i class="es-icon es-icon-info"></i>{{ error.message|raw }}</div>
    </div>
  {% else %}
    <div class="iframe-parent-content iframe-parent-full" id="document-content" data-res-no="{{ doc.file.globalId }}"
         data-token="{{ docMedia.token }}"
         data-user-id="{{app.user.id|default(0)}}"
         data-user-name="{{app.user.username|default('')}}"
      {% if setting('magic.doc_watermark') %}
        data-watermark-url="{{ path('cloud_doc_watermark') }}"
      {% endif %}>
    </div>
    <input type="hidden" class="js-cloud-url" data-url="{{ cloud_sdk_url('player') }}">
    {% do script(['libs/base.js','app/js/common.js','app/js/main.js','app/js/activity/new-doc/index.js'], 1000) %}
  {% endif %}
{% endblock %}